﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAO;
using DTO;

namespace BUS
{
    public class TAIKHOANBUS
    {
        public DataTable LoadDSTaiKhoan()
        {
            TAIKHOANDAO DAO = new TAIKHOANDAO();
            DataTable dt = new DataTable();
            dt = DAO.LoadTaiKhoan();
            return dt;
        }

        public void ThemTK(TAIKHOANDTO tkDto)
        {
            TAIKHOANDAO tkDao = new TAIKHOANDAO();
            tkDao.ThemTaiKhoan(tkDto);
        }

        public void XoaTK(int id)
        {
            TAIKHOANDAO tkDao = new TAIKHOANDAO();
            tkDao.XoaTaiKhoan(id);
        }

        public void SuaTK(TAIKHOANDTO tkDto)
        {
            TAIKHOANDAO tkDao = new TAIKHOANDAO();
            tkDao.SuaTaiKhoan(tkDto);
        }

        public DataTable LoadDSTimKiem(string tukhoa)
        {
            TAIKHOANDAO tkDao = new TAIKHOANDAO();
            DataTable dt = new DataTable();
            dt = tkDao.LoadTimKiem(tukhoa);
            return dt;
        }
    }
}
